/**
 * Created with JetBrains WebStorm.
 * User: 可乐加糖
 * Date: 12-11-22
 * Time: 下午10:47
 * To change this template use File | Settings | File Templates.
 */

window.onload = function(){
	var liList = document.getElementById("d1").getElementsByTagName("li");
    var olList = document.getElementById("d2").getElementsByTagName("li");

    for (var i = 0, icount = liList.length; i < icount; i++) {
        liList[i].onclick = (function(index){
            return function(){
                //索引值
                console.dir(olList[index]);
            }
        })(i);
    }
}